home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- prometheus.library/Prm_FindBoardTagList
- prometheus.library/Prm_GetBoardAttrsTagList
- prometheus.library/Prm_FindBoardTagListrometheus.library/Prm_FindBoardTagList
-
- NAME
- Prm_FindBoardTagList -- Finds PCI board with attributes given in the
- taglist.
- Prm_FindBoardTags -- Varargs stub for Prm_FindBoardTagList.
-
- SYNOPSIS
- Board = Prm_FindBoardTagList (Previous, TagList)
- A0 A1
-
- APTR Prm_FindBoardTagList (APTR, struct TagItem*);
-
- Board = Prm_FindBoardTags (Previous, Tag1, ...)
-
- APTR Prm_FindBoardTags (APTR, ULONG, ...);
-
- FUNCTION
- Finds all PCI boards connected to any Prometheus PCI bridge in the
- system, matching the tags in the TagList. First call returns first
- matching board found. To find all the matching boards call the
- function in loop until it returns NULL.
-
- INPUTS
- Previous - pointer to a "blackbox" PCI board structure. The function
- will search board list from the *next* board after
- Previous. NULL value means "start search from the
- beginning of internal list".
- TagList - list of tags all boards will be checked against.
-
- RESULT
- Board - a pointer to a "blackbox" PCI board structure. Don't try
- to peeking and pokeing it, use only as a parameter in
- prometheus.library calls. Function can return NULL if no
- [more] matching boards can be found.
-
- EXAMPLE
- Let's check if any Voodoo3 2000 board is plugged in:
-
- APTR board = NULL;
-
- while (board = Prm_FindBoardTags (board, PRM_Vendor,
- 0x121A, PRM_Device, 5, TAG_END))
- {
- /* do something with 'board' */
- }
-
- NOTES
- Don't give random values as Previous board. It should be only pointer
- returned by Prm_FindBoardTagList() call or NULL.
-
- BUGS
-
- SEE ALSO
- Prm_GetBoardAttrsTagList()
-
- prometheus.library/Prm_GetBoardAttrsTagLists.library/Prm_GetBoardAttrsTagList
-
- NAME
- Prm_GetBoardAttrsTagList -- reads information about PCI board.
- Prm_GetBoardAttrsTags -- Varargs stub for Prm_GetBoardAttrsTagList.
-
- SYNOPSIS
- Prm_GetBoardAttrsTagList (Board, TagList)
- A0 A1
-
- void Prm_GetBoardAttrsTagList (APTR, struct TagItem*);
-
- Prm_GetBoardAttrsTags (Board, Tag1, ...)
-
- void Prm_GetBoardAttrsTags (APTR, ULONG, ...);
-
- FUNCTION
- Reads information from board internal structure and writes it
- according to given taglist. Function looks for every passed tag value
- in database and if found writes its value at address given in ti_Data
- in passed TagList.
-
- INPUTS
- Board - "Blackbox" structure pointer returned by
- Prm_FindBoardTagList(). It can be NULL, function returns
- immediately in the case, no data are written. Don't pass
- random values here.
- TagList - Function will search in internal database for every ti_Tag
- in the TagList. If tag is found, ti_Data field is used as a
- pointer to ULONG and the information is written at the
- address. Unrecognized tags are skipped and 0 is written to
- the given ti_Data location. TagList can be NULL,
- function returns immediately at the case, no data are
- written. Following tags are recognized:
-
- PRM_Vendor - Board vendor number assigned by PCISIG.
- PRM_Device - Device number assigned by manufacturer.
- PRM_Revision - Device revision number assigned by manufacturer.
- PRM_Class - Device class as defined in PCI specification.
- PRM_SubClass - Device subclass as defined in PCI specification.
- PRM_MemoryAddrX - (where X can be from '0' to '5'), PCI board can have
- up to six memory blocks allocated. These tags contains base
- adresses of blocks assigned by prometheus.library in init code.
- NULL value means a block is not used. You can depend on fact that
- the last nybble of PRM_MemoryAddrX is equal to X. It is
- guarranted in future releases. So the code below is valid:
-
- /* read all possible base adresses */
-
- ULONG baseaddr;
-
- for (i = 0; i < 6; i++)
- {
- Prm_GetBoardAttrsTags (any_board, PRM_MemoryAddr0 + i,
- (ULONG)&baseaddr, TAG_END);
- }
-
- PRM_MemorySizeX - where X can be from '0' to '5'), PCI board can have
- up to six memory blocks allocated. These tags contains sizes
- of blocks assigned by prometheus.library in init code. NULL value
- means a block is not used. You can depend on fact that the last
- nybble of PRM_MemorySizeX is equal to X. It is guarranted in
- future releases (see code above).
- PRM_ROM_Address - Address of PCI on-board ROM (if found).
- PRM_ROM_Size - Size of PCI on-board ROM (if found).
- RESULT
- None.
-
- EXAMPLE
- Get first base address and block size of the card:
-
- ULONG baseaddress;
- ULONG blocksize;
-
- Prm_GetBoardAttrsTags (any_board,
- PRM_MemoryAddr0, (ULONG)&baseaddress,
- PRM_MemorySize0, (ULONG)&blocksize,
- TAG_END);
-
- NOTES
-
- BUGS
-
- SEE ALSO
-
-